(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
+(0, y) → y
+(s(x), y) → s(+(x, y))
+(p(x), y) → p(+(x, y))
minus(0) → 0
minus(s(x)) → p(minus(x))
minus(p(x)) → s(minus(x))
*(0, y) → 0
*(s(x), y) → +(*(x, y), y)
*(p(x), y) → +(*(x, y), minus(y))
Rewrite Strategy: FULL
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
+(s(x), y) →+ s(+(x, y))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [x / s(x)].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
+'(0', y) → y
+'(s(x), y) → s(+'(x, y))
+'(p(x), y) → p(+'(x, y))
minus(0') → 0'
minus(s(x)) → p(minus(x))
minus(p(x)) → s(minus(x))
*'(0', y) → 0'
*'(s(x), y) → +'(*'(x, y), y)
*'(p(x), y) → +'(*'(x, y), minus(y))
S is empty.
Rewrite Strategy: FULL
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
TRS:
Rules:
+'(0', y) → y
+'(s(x), y) → s(+'(x, y))
+'(p(x), y) → p(+'(x, y))
minus(0') → 0'
minus(s(x)) → p(minus(x))
minus(p(x)) → s(minus(x))
*'(0', y) → 0'
*'(s(x), y) → +'(*'(x, y), y)
*'(p(x), y) → +'(*'(x, y), minus(y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
+',
minus,
*'They will be analysed ascendingly in the following order:
+' < *'
minus < *'
(8) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
The following defined symbols remain to be analysed:
+', minus, *'
They will be analysed ascendingly in the following order:
+' < *'
minus < *'
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
+'(
gen_0':s:p2_0(
n4_0),
gen_0':s:p2_0(
b)) →
gen_0':s:p2_0(
+(
n4_0,
b)), rt ∈ Ω(1 + n4
0)
Induction Base:
+'(gen_0':s:p2_0(0), gen_0':s:p2_0(b)) →RΩ(1)
gen_0':s:p2_0(b)
Induction Step:
+'(gen_0':s:p2_0(+(n4_0, 1)), gen_0':s:p2_0(b)) →RΩ(1)
s(+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b))) →IH
s(gen_0':s:p2_0(+(b, c5_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
The following defined symbols remain to be analysed:
minus, *'
They will be analysed ascendingly in the following order:
minus < *'
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
minus(
gen_0':s:p2_0(
+(
1,
n595_0))) →
*3_0, rt ∈ Ω(n595
0)
Induction Base:
minus(gen_0':s:p2_0(+(1, 0)))
Induction Step:
minus(gen_0':s:p2_0(+(1, +(n595_0, 1)))) →RΩ(1)
p(minus(gen_0':s:p2_0(+(1, n595_0)))) →IH
p(*3_0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
minus(gen_0':s:p2_0(+(1, n595_0))) → *3_0, rt ∈ Ω(n5950)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
The following defined symbols remain to be analysed:
*'
(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
*'(
gen_0':s:p2_0(
n1725_0),
gen_0':s:p2_0(
b)) →
gen_0':s:p2_0(
*(
n1725_0,
b)), rt ∈ Ω(1 + b·n1725
02 + n1725
0)
Induction Base:
*'(gen_0':s:p2_0(0), gen_0':s:p2_0(b)) →RΩ(1)
0'
Induction Step:
*'(gen_0':s:p2_0(+(n1725_0, 1)), gen_0':s:p2_0(b)) →RΩ(1)
+'(*'(gen_0':s:p2_0(n1725_0), gen_0':s:p2_0(b)), gen_0':s:p2_0(b)) →IH
+'(gen_0':s:p2_0(*(c1726_0, b)), gen_0':s:p2_0(b)) →LΩ(1 + b·n17250)
gen_0':s:p2_0(+(*(n1725_0, b), b))
We have rt ∈ Ω(n3) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n3).
(16) Complex Obligation (BEST)
(17) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
minus(gen_0':s:p2_0(+(1, n595_0))) → *3_0, rt ∈ Ω(n5950)
*'(gen_0':s:p2_0(n1725_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(*(n1725_0, b)), rt ∈ Ω(1 + b·n172502 + n17250)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
No more defined symbols left to analyse.
(18) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n3) was proven with the following lemma:
*'(gen_0':s:p2_0(n1725_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(*(n1725_0, b)), rt ∈ Ω(1 + b·n172502 + n17250)
(19) BOUNDS(n^3, INF)
(20) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
minus(gen_0':s:p2_0(+(1, n595_0))) → *3_0, rt ∈ Ω(n5950)
*'(gen_0':s:p2_0(n1725_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(*(n1725_0, b)), rt ∈ Ω(1 + b·n172502 + n17250)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
No more defined symbols left to analyse.
(21) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n3) was proven with the following lemma:
*'(gen_0':s:p2_0(n1725_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(*(n1725_0, b)), rt ∈ Ω(1 + b·n172502 + n17250)
(22) BOUNDS(n^3, INF)
(23) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
minus(gen_0':s:p2_0(+(1, n595_0))) → *3_0, rt ∈ Ω(n5950)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
No more defined symbols left to analyse.
(24) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
(25) BOUNDS(n^1, INF)
(26) Obligation:
TRS:
Rules:
+'(
0',
y) →
y+'(
s(
x),
y) →
s(
+'(
x,
y))
+'(
p(
x),
y) →
p(
+'(
x,
y))
minus(
0') →
0'minus(
s(
x)) →
p(
minus(
x))
minus(
p(
x)) →
s(
minus(
x))
*'(
0',
y) →
0'*'(
s(
x),
y) →
+'(
*'(
x,
y),
y)
*'(
p(
x),
y) →
+'(
*'(
x,
y),
minus(
y))
Types:
+' :: 0':s:p → 0':s:p → 0':s:p
0' :: 0':s:p
s :: 0':s:p → 0':s:p
p :: 0':s:p → 0':s:p
minus :: 0':s:p → 0':s:p
*' :: 0':s:p → 0':s:p → 0':s:p
hole_0':s:p1_0 :: 0':s:p
gen_0':s:p2_0 :: Nat → 0':s:p
Lemmas:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
Generator Equations:
gen_0':s:p2_0(0) ⇔ 0'
gen_0':s:p2_0(+(x, 1)) ⇔ s(gen_0':s:p2_0(x))
No more defined symbols left to analyse.
(27) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
+'(gen_0':s:p2_0(n4_0), gen_0':s:p2_0(b)) → gen_0':s:p2_0(+(n4_0, b)), rt ∈ Ω(1 + n40)
(28) BOUNDS(n^1, INF)